Does the polygon primitive only draw 2D polygons or am I doing something wrong
when I try to use it to draw a pentagon in 3D?
I walked through the tutorial portion that deals with rendering polygons. The
tutorial focuses on a 2d polygon but I was assuming as I read it that if I
specified z components for the points, the polygon primitive would still work.
I loaded 5 points for my first attempt at building a single surface on a
dodecahedron and got a black screen. To make sure the camera and lights were
reasonably oriented, I culled the z components from the pentagon's vertices and
got a flat pentagon. Put the z components back in after verifying that the 5
points did lie in a plane and the polygon vanished again. I was subsequently
able to render the pentagon by stitching together three triangles using the 5
points.
Post a reply to this message
|